(function() {
	
	new sCanvas("canvas", function() {
		
		var i, j, rectangles;
		
		for (i = 0; i < 5; i++) {
			for (j = 0; j < 7; j++) {
				this.rect({
					x: j * 50 + 50,
					y: i * 50 + 50,
					width: 30,
					height: 30,
					fill: "#666",
					stroke: "#000",
					group: "rectangles"
				});
			}
		}
		
		this.get("rectangles").animate({
			rotation: 4 * Math.PI,
			x: 200,
			y: 150
		}, 15000);
		
	}, function() {
		alert("Při inicializaci canvasu došlo k chybě.");
	});
	
}());